package com.spddr.pmos.cxf;

import java.util.List;

import javax.ws.rs.DELETE;
import javax.ws.rs.GET;
import javax.ws.rs.PUT;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;

import com.spddr.pmos.jpa.ContractDetail;
import com.spddr.pmos.jpa.ContractDetailId;

import cn.seqdata.cxf.repos.JaxrsRepository;

@Path("/contract/{contract}/details")
public interface JaxrsContractDetail extends JaxrsRepository<ContractDetail, ContractDetailId> {
	@GET
	@Path("/")
	List<ContractDetail> findByContract(@PathParam("contract") long contract);

	@PUT
	@Path("/")
	void saveByContract(@PathParam("contract") long contract, List<ContractDetail> entities);

	@DELETE
	@Path("/")
	void deleteByContract(@PathParam("contract") long contract);
}
